﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGeAugPolyline3d : OdGePolyline3d
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGeAugPolyline3d(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGeAugPolyline3d_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGeAugPolyline3d obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGeAugPolyline3d()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGeAugPolyline3d(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGeAugPolyline3d() : this(GlobalsPINVOKE.new_OdGeAugPolyline3d__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeAugPolyline3d(OdGeAugPolyline3d apline) : this(GlobalsPINVOKE.new_OdGeAugPolyline3d__SWIG_1(OdGeAugPolyline3d.getCPtr(apline)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeAugPolyline3d(OdGeKnotVector knots, OdGePoint3dArray controlPoints, OdGeVector3dArray vecBundle) : this(GlobalsPINVOKE.new_OdGeAugPolyline3d__SWIG_2(OdGeKnotVector.getCPtr(knots), OdGePoint3dArray.getCPtr(controlPoints), OdGeVector3dArray.getCPtr(vecBundle)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeAugPolyline3d(OdGePoint3dArray controlPoints, OdGeVector3dArray vecBundle) : this(GlobalsPINVOKE.new_OdGeAugPolyline3d__SWIG_3(OdGePoint3dArray.getCPtr(controlPoints), OdGeVector3dArray.getCPtr(vecBundle)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeAugPolyline3d(OdGeCurve3d curve, double fromParam, double toParam, double approxEps) : this(GlobalsPINVOKE.new_OdGeAugPolyline3d__SWIG_4(OdGeCurve3d.getCPtr(curve), fromParam, toParam, approxEps), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeAugPolyline3d Assign(OdGeAugPolyline3d apline)
		{
			OdGeAugPolyline3d result = new OdGeAugPolyline3d(GlobalsPINVOKE.OdGeAugPolyline3d_Assign(this.swigCPtr, OdGeAugPolyline3d.getCPtr(apline)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d getPoint(int index)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGeAugPolyline3d_getPoint(this.swigCPtr, index), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeAugPolyline3d setPoint(int controlpointIndex, OdGePoint3d point)
		{
			OdGeAugPolyline3d result = new OdGeAugPolyline3d(GlobalsPINVOKE.OdGeAugPolyline3d_setPoint(this.swigCPtr, controlpointIndex, OdGePoint3d.getCPtr(point)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getPoints(OdGePoint3dArray controlPoints)
		{
			GlobalsPINVOKE.OdGeAugPolyline3d_getPoints(this.swigCPtr, OdGePoint3dArray.getCPtr(controlPoints));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeVector3d getVector(int vectorIndex)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeAugPolyline3d_getVector(this.swigCPtr, vectorIndex), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeAugPolyline3d setVector(int vectorIndex, OdGeVector3d vect)
		{
			OdGeAugPolyline3d result = new OdGeAugPolyline3d(GlobalsPINVOKE.OdGeAugPolyline3d_setVector(this.swigCPtr, vectorIndex, OdGeVector3d.getCPtr(vect)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getD1Vectors(OdGeVector3dArray tangents)
		{
			GlobalsPINVOKE.OdGeAugPolyline3d_getD1Vectors(this.swigCPtr, OdGeVector3dArray.getCPtr(tangents));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeVector3d getD2Vector(int vectorIndex)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeAugPolyline3d_getD2Vector(this.swigCPtr, vectorIndex), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeAugPolyline3d setD2Vector(int vectorIndex, OdGeVector3d vect)
		{
			OdGeAugPolyline3d result = new OdGeAugPolyline3d(GlobalsPINVOKE.OdGeAugPolyline3d_setD2Vector(this.swigCPtr, vectorIndex, OdGeVector3d.getCPtr(vect)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getD2Vectors(OdGeVector3dArray d2Vectors)
		{
			GlobalsPINVOKE.OdGeAugPolyline3d_getD2Vectors(this.swigCPtr, OdGeVector3dArray.getCPtr(d2Vectors));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double approxTol()
		{
			double result = GlobalsPINVOKE.OdGeAugPolyline3d_approxTol(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeAugPolyline3d setApproxTol(double approxTol)
		{
			OdGeAugPolyline3d result = new OdGeAugPolyline3d(GlobalsPINVOKE.OdGeAugPolyline3d_setApproxTol(this.swigCPtr, approxTol), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
